<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>提现编辑</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no">
  <link rel="stylesheet" href="${s.base}/js/layui/css/layui.css" media="all" />
  <link rel="stylesheet" href="${s.base}/css/base/base.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form" style="width:80%;">
  <input type="hidden" id="id" name="id" value="${shopWithdraw.id}" />

  <div class="layui-form-item layui-row layui-col-xs12" >
    <label class="layui-form-label">昵称</label>
    <div class="layui-input-block">
      <input type="text" class="layui-input name" disabled id="nickName" name="nickName" value="${webMember.nickName}" >
      <input type="hidden" id="memberId" name="memberId" value="${webMember.memberId}" >
    </div>
  </div>
  <div class="layui-form-item layui-row layui-col-xs12" >
    <label class="layui-form-label">姓名</label>
    <div class="layui-input-block">
      <input type="text" class="layui-input name" disabled  value="${webMember.name}" >
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12" >
    <label class="layui-form-label">提现金额</label>
    <div class="layui-input-block">
      <input type="text" class="layui-input name" disabled id="money" name="money" value="${shopWithdraw.money}元" >
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">是否通过</label>
    <div class="layui-input-block">
      <input type="radio" name="status" value="3" title="否" <#if shopWithdraw.status?if_exists&&shopWithdraw.status=='3'> checked</#if>>
      <input type="radio" name="status" value="2" title="是" <#if shopWithdraw.status?if_exists&&shopWithdraw.status=='2'> checked</#if>>
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12">
    <label class="layui-form-label">
      &nbsp;&nbsp;备注</label>
    <div class="layui-input-block">
      <textarea class="layui-textarea" name="description" lay-verify="content">${shopWithdraw.description}</textarea>
    </div>
  </div>

  <div class="layui-form-item layui-row layui-col-xs12">
    <div class="layui-input-block">
      <#if shopWithdraw.status?if_exists&&shopWithdraw.status=='1'>
      <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="submitBtn">确定</button>
      </#if>
      <button type="reset" class="layui-btn layui-btn-sm layui-btn-primary cancel">取消</button>
    </div>
  </div>
</form>
<script type="text/javascript" src="${s.base}/js/layui/layui.js"></script>
<script type="text/javascript" src="${s.base}/js/base/base.js"></script>
<script type="text/javascript">
    layui.use(['form', 'jquery', 'baseUtil', 'pageUtil','fileUtil','dialogUtil'],
    function() {
        var form = layui.form,
            $ = layui.jquery,
            dialogUtil = layui.dialogUtil,
            fileUtil = layui.fileUtil,
            baseUtil = layui.baseUtil,
            pageUtil = layui.pageUtil;

        form.on('submit(submitBtn)',
            function(data) {
                var field = data.field;
                var status = field.status;
                if (status == null || status == "" || status == undefined || status == "undefined") {
                    // status="3";
                    dialogUtil.alert("请选择提现状态");
                    return false;
                }
                var description = field.description;
                baseUtil.postMethodResult("/shopWithdraw/updateStatus", {id:$("#id").val(),status : status,description:description},
                    function(result) {
                        parent.location.reload();
                    });
                return false;
            });
    });
</script>
</body>
</html>